<template>
  <div class="inspect">
    <measure v-if="activeName == '1'"></measure>
    <immobilization v-if="activeName == '2'"></immobilization>
    <fireControl v-if="activeName == '3'"></fireControl>
  </div>
</template>

<script>
import measure from "@/views/maintenance/operation/maintenance/measure.vue";
import immobilization from "@/views/maintenance/operation/maintenance/immobilization.vue";
import fireControl from "@/views/maintenance/operation/maintenance/fireControl.vue";
export default {
  components: {
    measure,
    immobilization,
    fireControl,
  },
  data() {
    return {
      // tab
      activeName: "1",
    };
  },
  created() {
    this.routerJudge();
  },
  methods: {
    routerJudge() {
      let routeflage = this.$route.path;
      // console.log(routeflage, "routeflage");
      switch (routeflage) {
        case "/maintenance/operation/operation":
          this.activeName = "1";
          break;
        case "/maintenance/operation/bag":
          this.activeName = "1";
          break;
        case "/maintenance/operation/fixation":
          this.activeName = "2";
          break;
        case "/maintenance/operation/firecontrol":
          this.activeName = "3";
          break;
      }
    },
    // tabChange() {
    //   console.log(this.activeName);
    // },
  },
};
</script>

<style lang="scss" scoped>
.inspect {
  position: relative;
  padding-top: 0;
  .alarmCom-area {
    position: absolute;
    bottom: 5px;
    right: 5px;
  }
}
::v-deep .text-tabs {
  .el-tabs__active-bar {
    width: 79px;
  }
  .el-tabs__item {
    font-size: 20px;
    font-weight: 600;
    opacity: 0.8;
  }
}
.text-tabs {
  margin: 0 0 0 -30px;
}
.text-tabs-ex {
  margin: -10px 0 10px -40px;
}
.search-row {
  width: 100%;
  height: 30px;
}
.informed {
  .total {
    padding: 2px 0;
    margin: 0;
    span {
      font-size: 20px;
      color: #3595c8;
    }
    .red {
      color: #ff8194;
    }
  }
  .info-title {
    padding: 0;
    margin: 0;
    font-size: 16px;
  }
  .smalls {
    height: 105px;
    background: #f3f9fe;
    display: flex;
    img {
      width: 40px;
      height: 40px;
      margin: 0 6px;
    }
  }
  .big {
    height: 220px;
    text-align: center;
    img {
      width: 100px;
      height: 100px;
      margin: 0 20px;
    }
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .info-title {
      margin: 16px 0;
    }
  }
  .informed-item {
    overflow: hidden;
    border-radius: 10px;
    padding: 20px 0;
    // cursor: pointer;
    display: flex;
    align-items: center;
  }
  .informed-item-ex {
    height: 100px;
    margin-top: 10px;
    background: #f3f9fe;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    .tit {
      color: #3385ff;
      display: flex;
      justify-content: center;
      align-items: center;
      flex-wrap: wrap;
      div {
        width: 50%;
        text-align: center;
        padding: 5px 0;
      }
    }
  }

  .p0 {
    padding-top: 0;
  }
}
.leakage {
  font-size: 14px;
  height: 220px;
  text-align: center;
  background: #fff;
  // cursor: pointer;
  img {
    width: 60px;
    height: 60px;
  }
  .time {
    font-size: 14px;
    color: #888888;
    margin: 0;
  }
}
.m10 {
  margin: 10px 0;
}
</style>
